﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OAuth.ServiceProviders;
using OAuth;

namespace YammerTestApp
{
    class YammerSessionParameter : IOAuthSessionParameter
    {
        Yammer yammer = new Yammer(Program.AuthUserWithResponse);

        #region IOAuthSessionParameter Members

        public string ConsumerKey
        {
            //get { return "ym2pUoszQMHrRinIiWQ0g"; }
            //get { return "3HLCKYlqH4WSwQRdJpmcSQ"; }
            get { return "cGp6TWVRuYZpKdiEMwYd2Q"; }
        }

        public string ConsumerSecret
        {
            //get { return "eVXjAYGMZKqD9JTa5YoVZgHHHtDqLFFXxALyUfsQ1c"; }
            //get { return "DB8VHY50K4GXCyy2BKjr9eWxppJc51It3gymVPriw8"; }
            get { return "7LpyLO06kwPPYVC1NkwkPzMZFck9HZyV0TBkFa7gSc"; }
        }

        public OAuth.IServiceProvider ServiceProvider
        {
            get { return yammer; }
        }

        public IAccessTokenStorage TokenStorage
        {
            get { return Program.TransitoryTokenStorage; }
            set { Program.TransitoryTokenStorage = value; }
        }

        public string CallWeb(ISignedWebRequest pRequest)
        {
            return Program.CallWeb(pRequest);

        }

        #endregion

    }
}
